﻿<Window
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" mc:Ignorable="d" x:Class="WpfApplication2.MainWindow"
        Title="MainWindow" Height="614" Width="775" DataContext="{Binding}" Validation.Error="Window_Error">
    <Grid Background="#FFCEE8D5" Height="584" Width="763">
        <Grid.RowDefinitions>
            <RowDefinition Height="90*" />
            <RowDefinition Height="85*" />
            <RowDefinition Height="231*" />
            <RowDefinition Height="157*" />
        </Grid.RowDefinitions>
        <Grid.ColumnDefinitions>
        	<ColumnDefinition Width="105*" />
            <ColumnDefinition Width="220*" />
            <ColumnDefinition Width="386*"/>
            <ColumnDefinition Width="0*"/>
            <ColumnDefinition Width="0*" />
        </Grid.ColumnDefinitions>

        <TextBox Grid.Column="2" Grid.Row="1"  Height="32" HorizontalAlignment="Left" Margin="44,25,0,0" x:Name="textBox1" VerticalAlignment="Top" Width="216" Text="{Binding Mode=TwoWay, ValidatesOnDataErrors=True, ValidatesOnExceptions=True, Path=High, NotifyOnValidationError=True}" Validation.ErrorTemplate="{StaticResource validationTemplate}" Style="{StaticResource textBoxInError}" />
        <TextBox Grid.Column="2" Height="33" HorizontalAlignment="Left" Margin="44,26,0,0" x:Name="textBox2" VerticalAlignment="Top" Width="216" Text="{Binding Mode=TwoWay, ValidatesOnDataErrors=True, ValidatesOnExceptions=True, Path=Low, NotifyOnValidationError=True}" Validation.ErrorTemplate="{StaticResource validationTemplate}" Style="{StaticResource textBoxInError}" />
        <Label Content="Low" Height="34" HorizontalAlignment="Left" Margin="26,26,0,0" x:Name="label1" VerticalAlignment="Top" Width="43" Grid.Column="1" />
        <Label Content="High" Grid.Row="1" Height="34" HorizontalAlignment="Left" Margin="26,26,0,0" x:Name="label2" VerticalAlignment="Top" Width="77" Grid.Column="1" />
        <TextBlock Margin="12,12,11,14" x:Name="textBlock1"  Foreground="Red"  Text="{Binding Mode=OneWay, Path=Error}" TextAlignment="Center" Grid.RowSpan="2" />
        <Grid Margin="0,0,12,0" Grid.Row="2" Grid.Column="1"  Grid.ColumnSpan="2" DataContext="{Binding Mode=TwoWay, Path=InnerInterval, UpdateSourceTrigger=Explicit}" x:Name="InnerGrid" Background="#FFECEBBB" d:LayoutOverrides="GridBox" Height="239" VerticalAlignment="Top">
    		<Grid.ColumnDefinitions>
    			<ColumnDefinition Width="130*"/>
                <ColumnDefinition Width="232*" />
                <ColumnDefinition Width="276*"/>
        		
    		</Grid.ColumnDefinitions>
    		<Grid.RowDefinitions>
    			<RowDefinition Height="59*"/>
    			<RowDefinition Height="48*"/>
    			<RowDefinition Height="132*"/>
    		</Grid.RowDefinitions>
    		<Label Content="Inner Low" HorizontalAlignment="Left" Margin="71,23,0,0" x:Name="label3" Width="126" d:LayoutOverrides="GridBox" Height="25" VerticalAlignment="Top" Grid.Column="1" />
    		<TextBox Grid.Column="2" HorizontalAlignment="Left" Margin="17,23,0,13" x:Name="textBox3" Width="213" Text="{Binding Mode=TwoWay, ValidatesOnDataErrors=True, ValidatesOnExceptions=True, Path=Low, NotifyOnValidationError=True}" Validation.ErrorTemplate="{StaticResource validationTemplate}" Style="{StaticResource textBoxInError}"/>
    		<Label Content="Inner High" HorizontalAlignment="Left" Margin="73,13,0,0" x:Name="label3_Copy" Width="92" RenderTransformOrigin="0.516,3.205" Grid.Row="1" Height="25" VerticalAlignment="Top" Grid.Column="1" />
    		<TextBox Grid.Column="2" HorizontalAlignment="Left" Margin="16,11,0,10" x:Name="textBox3_Copy" Width="213" Text="{Binding Mode=TwoWay, ValidatesOnDataErrors=True, ValidatesOnExceptions=True, Path=High, NotifyOnValidationError=True}" Validation.ErrorTemplate="{StaticResource validationTemplate}" Style="{StaticResource textBoxInError}" Grid.Row="1"/>
    		<TextBlock x:Name="textBlock1_Copy"  Foreground="Red" Text="{Binding Mode=OneWay, Path=Error}" Margin="6,6,0,10" TextAlignment="Center" Grid.RowSpan="2" />
        </Grid>
        <Button Content="Send" Grid.Column="2" Margin="0,106,85,15" Grid.Row="3" HorizontalAlignment="Right" Width="87" Height="40" Click="Button_Click" d:LayoutOverrides="GridBox, VerticalMargin" />
        <TextBlock Grid.Row="2" Text="{Binding Mode=OneWay, Path=[InnerInterval]}" Height="206" HorizontalAlignment="Left" Margin="12,6,0,0" Name="textBlock2" VerticalAlignment="Top" Width="90" TextAlignment="Center" Foreground="#FFDD0000" />
        <Button Content="Trigger Fake Validate Exception" Grid.Column="1" Grid.Row="3" Height="40" HorizontalAlignment="Left" Margin="26,107,0,0" Name="button1" VerticalAlignment="Top" Width="192" Click="button1_Click" />
    </Grid>
</Window>
